package com.test;

//1-10的奇数
public class Example15 {
    public static void main(String[] args) {
        //while循环
        int a = 0;
        while (a <= 10) {
            if (a % 2 != 0) {
                System.out.print(a + ",");
            }
            a++;
        }
        System.out.println();
        //do while
        int b = 0;
        do {
            if (b % 2 != 0) {
                System.out.print(b + ",");
            }
            b++;
        } while (b <= 10);
        System.out.println();

        //for
        int c = 0;
        for (c = 0; c <= 10; c++) {
            if (c % 2 != 0) {
                System.out.print(c + ",");
            }
        }
    }
}
